package com.yy.job.utils.exception;

import com.yy.job.common.enums.ErrorCodeEnum;

public class YYJobRuntimeExceptionUtils {

	public static void throwException(ErrorCodeEnum errorCode) {
		throw new YYJobRuntimeException(errorCode.getCode(), errorCode.getErrorMsg());
	}

	public static void throwException(ErrorCodeEnum errorCode, Object... args) {
		throw new YYJobRuntimeException(errorCode.getCode(), errorCode.getErrorMsg(args));
	}

}
